(function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ 'use strict';var q;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); t("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c=e}}); t("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Aa(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}}); t("Object.setPrototypeOf",function(a){return a||la}); var Ba="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cc&&(c=Math.max(c+e,0));c>>0),Ha=0;function Ia(a,b,c){return a.call.apply(a.bind,arguments)} function Ja(a,b,c){if(!a)throw Error();if(2b?null:"string"===typeof a?a.charAt(b):a[b]} function Sa(a,b){b=Pa(a,b);var c;(c=0<=b)&&Array.prototype.splice.call(a,b,1);return c} function Ta(a){return Array.prototype.concat.apply([],arguments)} function Ua(a){var b=a.length;if(0/g,hb=/"/g,ib=/'/g,jb=/\x00/g,kb=/[\x00&<>"']/;var lb;a:{var mb=A.navigator;if(mb){var nb=mb.userAgent;if(nb){lb=nb;break a}}lb=""}function I(a){return-1!=lb.indexOf(a)} ;function ob(a){this.h=pb===pb?a:""} ob.prototype.toString=function(){return this.h.toString()}; var pb={};var qb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function rb(a){return a?decodeURI(a):a} function sb(a){return rb(a.match(qb)[3]||null)} function tb(a){var b=a.match(qb);a=b[1];var c=b[2],d=b[3];b=b[4];var e="";a&&(e+=a+":");d&&(e+="//",c&&(e+=c+"@"),e+=d,b&&(e+=":"+b));return e} function ub(a,b,c){if(Array.isArray(b))for(var d=0;dd)return null;e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=b.length+1;return decodeURIComponent(a.substr(d,e-d).replace(/\+/g," "))} ;function J(a,b){var c=void 0;return new (c||(c=Promise))(function(d,e){function f(k){try{h(b.next(k))}catch(l){e(l)}} function g(k){try{h(b["throw"](k))}catch(l){e(l)}} function h(k){k.done?d(k.value):(new c(function(l){l(k.value)})).then(f,g)} h((b=b.apply(a,void 0)).next())})} ;function yb(){return I("iPhone")&&!I("iPod")&&!I("iPad")} ;function zb(a){zb[" "](a);return a} zb[" "]=Da;var Ab=I("Opera"),Bb=I("Trident")||I("MSIE"),Cb=I("Edge"),Db=I("Gecko")&&!(-1!=lb.toLowerCase().indexOf("webkit")&&!I("Edge"))&&!(I("Trident")||I("MSIE"))&&!I("Edge"),Eb=-1!=lb.toLowerCase().indexOf("webkit")&&!I("Edge");function Fb(){var a=A.document;return a?a.documentMode:void 0} var Gb;a:{var Hb="",Ib=function(){var a=lb;if(Db)return/rv:([^\);]+)(\)|;)/.exec(a);if(Cb)return/Edge\/([\d\.]+)/.exec(a);if(Bb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Eb)return/WebKit\/(\S+)/.exec(a);if(Ab)return/(?:Version)[ \/]?(\S+)/.exec(a)}(); Ib&&(Hb=Ib?Ib[1]:"");if(Bb){var Jb=Fb();if(null!=Jb&&Jb>parseFloat(Hb)){Gb=String(Jb);break a}}Gb=Hb}var Kb=Gb,Lb;if(A.document&&Bb){var Mb=Fb();Lb=Mb?Mb:parseInt(Kb,10)||void 0}else Lb=void 0;var Nb=Lb;var Ob=yb()||I("iPod"),Pb=I("iPad"),Qb=I("Safari")&&!((I("Chrome")||I("CriOS"))&&!I("Edge")||I("Coast")||I("Opera")||I("Edge")||I("Edg/")||I("OPR")||I("Firefox")||I("FxiOS")||I("Silk")||I("Android"))&&!(yb()||I("iPad")||I("iPod"));var Rb={},Sb=null;var K=window;function Tb(a,b){this.width=a;this.height=b} q=Tb.prototype;q.clone=function(){return new Tb(this.width,this.height)}; q.aspectRatio=function(){return this.width/this.height}; q.isEmpty=function(){return!(this.width*this.height)}; q.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this}; q.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; q.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Ub(){var a=document;var b="IFRAME";"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)} function Vb(a,b){for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} ;function Wb(a){var b=Xb;if(b)for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&a.call(void 0,b[c],c,b)} function Yb(){var a=[];Wb(function(b){a.push(b)}); return a} var Xb={La:"allow-forms",Ma:"allow-modals",Na:"allow-orientation-lock",Oa:"allow-pointer-lock",Pa:"allow-popups",Qa:"allow-popups-to-escape-sandbox",Ra:"allow-presentation",Sa:"allow-same-origin",Ta:"allow-scripts",Ua:"allow-top-navigation",Va:"allow-top-navigation-by-user-activation"},Zb=Oa(function(){return Yb()}); function $b(){var a=Ub(),b={};H(Zb(),function(c){a.sandbox&&a.sandbox.supports&&a.sandbox.supports(c)&&(b[c]=!0)}); return b} ;var ac=(new Date).getTime();function bc(a){if(!a)return"";a=a.split("#")[0].split("?")[0];a=a.toLowerCase();0==a.indexOf("//")&&(a=window.location.protocol+a);/^[\w\-]*:\/\//.test(a)||(a=window.location.href);var b=a.substring(a.indexOf("://")+3),c=b.indexOf("/");-1!=c&&(b=b.substring(0,c));c=a.substring(0,a.indexOf("://"));if(!c)throw Error("URI is missing protocol: "+a);if("http"!==c&&"https"!==c&&"chrome-extension"!==c&&"moz-extension"!==c&&"file"!==c&&"android-app"!==c&&"chrome-search"!==c&&"chrome-untrusted"!==c&&"chrome"!== c&&"app"!==c&&"devtools"!==c)throw Error("Invalid URI scheme in origin: "+c);a="";var d=b.indexOf(":");if(-1!=d){var e=b.substring(d+1);b=b.substring(0,d);if("http"===c&&"80"!==e||"https"===c&&"443"!==e)a=":"+e}return c+"://"+b+a} ;function cc(){function a(){e[0]=1732584193;e[1]=4023233417;e[2]=2562383102;e[3]=271733878;e[4]=3285377520;m=l=0} function b(n){for(var r=g,p=0;64>p;p+=4)r[p/4]=n[p]<<24|n[p+1]<<16|n[p+2]<<8|n[p+3];for(p=16;80>p;p++)n=r[p-3]^r[p-8]^r[p-14]^r[p-16],r[p]=(n<<1|n>>>31)&4294967295;n=e[0];var x=e[1],B=e[2],z=e[3],O=e[4];for(p=0;80>p;p++){if(40>p)if(20>p){var P=z^x&(B^z);var G=1518500249}else P=x^B^z,G=1859775393;else 60>p?(P=x&B|z&(x|B),G=2400959708):(P=x^B^z,G=3395469782);P=((n<<5|n>>>27)&4294967295)+P+O+G+r[p]&4294967295;O=z;z=B;B=(x<<30|x>>>2)&4294967295;x=n;n=P}e[0]=e[0]+n&4294967295;e[1]=e[1]+x&4294967295;e[2]= e[2]+B&4294967295;e[3]=e[3]+z&4294967295;e[4]=e[4]+O&4294967295} function c(n,r){if("string"===typeof n){n=unescape(encodeURIComponent(n));for(var p=[],x=0,B=n.length;xl?c(h,56-l):c(h,64-(l-56));for(var p=63;56<=p;p--)f[p]=r&255,r>>>=8;b(f);for(p=r=0;5>p;p++)for(var x=24;0<=x;x-=8)n[r++]=e[p]>>x&255;return n} for(var e=[],f=[],g=[],h=[128],k=1;64>k;++k)h[k]=0;var l,m;a();return{reset:a,update:c,digest:d,xa:function(){for(var n=d(),r="",p=0;ph?"":0==h?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(Date.now()+1E3*h)).toUTCString())+(d?";secure":"")+(null!=e?";samesite="+e:"")}; q.get=function(a,b){for(var c=a+"=",d=(this.h.cookie||"").split(";"),e=0,f;ea&&0===a%1&&this.data_[a]!=b&&(this.data_[a]=b,this.h=-1)}; mc.prototype.get=function(a){return!!this.data_[a]}; function nc(a){-1==a.h&&(a.h=Qa(a.data_,function(b,c,d){return c?b+Math.pow(2,d):b},0)); return a.h} ;function oc(a,b){this.j=a;this.l=b;this.i=0;this.h=null} oc.prototype.get=function(){if(0a.i&&(a.i++,b.next=a.h,a.h=b)} ;var qc;function rc(){var a=A.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!I("Presto")&&(a=function(){var e=Ub();e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),h="file:"==f.location.protocol?"*":f.location.protocol+"//"+f.location.host;e=Ka(function(k){if(("*"==h||k.origin==h)&&k.data==g)this.port1.onmessage()},this); f.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,h)}}}); if("undefined"!==typeof a&&!I("Trident")&&!I("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.ha;c.ha=null;e()}}; return function(e){d.next={ha:e};d=d.next;b.port2.postMessage(0)}}return function(e){A.setTimeout(e,0)}} ;function sc(a){A.setTimeout(function(){throw a;},0)} ;function tc(){this.i=this.h=null} tc.prototype.add=function(a,b){var c=uc.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}; tc.prototype.remove=function(){var a=null;this.h&&(a=this.h,this.h=this.h.next,this.h||(this.i=null),a.next=null);return a}; var uc=new oc(function(){return new vc},function(a){return a.reset()}); function vc(){this.next=this.scope=this.h=null} vc.prototype.set=function(a,b){this.h=a;this.scope=b;this.next=null}; vc.prototype.reset=function(){this.next=this.scope=this.h=null};function wc(a,b){xc||yc();zc||(xc(),zc=!0);Ac.add(a,b)} var xc;function yc(){if(A.Promise&&A.Promise.resolve){var a=A.Promise.resolve(void 0);xc=function(){a.then(Bc)}}else xc=function(){var b=Bc; "function"!==typeof A.setImmediate||A.Window&&A.Window.prototype&&!I("Edge")&&A.Window.prototype.setImmediate==A.setImmediate?(qc||(qc=rc()),qc(b)):A.setImmediate(b)}} var zc=!1,Ac=new tc;function Bc(){for(var a;a=Ac.remove();){try{a.h.call(a.scope)}catch(b){sc(b)}pc(uc,a)}zc=!1} ;function Cc(){this.blockSize=-1} ;function Dc(){this.blockSize=-1;this.blockSize=64;this.h=[];this.m=[];this.s=[];this.j=[];this.j[0]=128;for(var a=1;ae;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.h[0];c=a.h[1];var g=a.h[2],h=a.h[3],k=a.h[4];for(e=0;80>e;e++){if(40>e)if(20>e){f=h^c&(g^h);var l=1518500249}else f=c^g^h,l=1859775393;else 60>e?(f=c&g|h&(c|g),l=2400959708): (f=c^g^h,l=3395469782);f=(b<<5|b>>>27)+f+k+l+d[e]&4294967295;k=h;h=g;g=(c<<30|c>>>2)&4294967295;c=b;b=f}a.h[0]=a.h[0]+b&4294967295;a.h[1]=a.h[1]+c&4294967295;a.h[2]=a.h[2]+g&4294967295;a.h[3]=a.h[3]+h&4294967295;a.h[4]=a.h[4]+k&4294967295} Dc.prototype.update=function(a,b){if(null!=a){void 0===b&&(b=a.length);for(var c=b-this.blockSize,d=0,e=this.m,f=this.i;dthis.i?this.update(this.j,56-this.i):this.update(this.j,this.blockSize-(this.i-56));for(var c=this.blockSize-1;56<=c;c--)this.m[c]=b&255,b/=256;Ec(this,this.m);for(c=b=0;5>c;c++)for(var d=24;0<=d;d-=8)a[b]=this.h[c]>>d&255,++b;return a};function Fc(a){var b=C("window.location.href");null==a&&(a='Unknown Error of type "null/undefined"');if("string"===typeof a)return{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"};var c=!1;try{var d=a.lineNumber||a.line||"Not available"}catch(g){d="Not available",c=!0}try{var e=a.fileName||a.filename||a.sourceURL||A.$googDebugFname||b}catch(g){e="Not available",c=!0}b=Gc(a);if(!(!c&&a.lineNumber&&a.fileName&&a.stack&&a.message&&a.name)){c=a.message;if(null== c){if(a.constructor&&a.constructor instanceof Function){if(a.constructor.name)c=a.constructor.name;else if(c=a.constructor,Hc[c])c=Hc[c];else{c=String(c);if(!Hc[c]){var f=/function\s+([^\(]+)/m.exec(c);Hc[c]=f?f[1]:"[Anonymous]"}c=Hc[c]}c='Unknown Error of type "'+c+'"'}else c="Unknown Error of unknown type";"function"===typeof a.toString&&Object.prototype.toString!==a.toString&&(c+=": "+a.toString())}return{message:c,name:a.name||"UnknownError",lineNumber:d,fileName:e,stack:b||"Not available"}}a.stack= b;return{message:a.message,name:a.name,lineNumber:a.lineNumber,fileName:a.fileName,stack:a.stack}} function Gc(a,b){b||(b={});b[Ic(a)]=!0;var c=a.stack||"";(a=a.wa)&&!b[Ic(a)]&&(c+="\nCaused by: ",a.stack&&0==a.stack.indexOf(a.toString())||(c+="string"===typeof a?a:a.message+"\n"),c+=Gc(a,b));return c} function Ic(a){var b="";"function"===typeof a.toString&&(b=""+a);return b+a.stack} var Hc={};function Jc(){this.m=this.m;this.s=this.s} Jc.prototype.m=!1;Jc.prototype.dispose=function(){this.m||(this.m=!0,this.R())}; Jc.prototype.R=function(){if(this.s)for(;this.s.length;)this.s.shift()()};var Kc="StopIteration"in A?A.StopIteration:{message:"StopIteration",stack:""};function Lc(){} Lc.prototype.next=function(){throw Kc;}; Lc.prototype.G=function(){return this};function Mc(a,b){this.i={};this.h=[];this.l=this.j=0;var c=arguments.length;if(12*this.j&&Oc(this),!0):!1}; function Oc(a){if(a.j!=a.h.length){for(var b=0,c=0;b=d.h.length)throw Kc;var f=d.h[b++];return a?f:d.i[f]}; return e};var Qc=function(){if(!A.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}}); try{A.addEventListener("test",Da,b),A.removeEventListener("test",Da,b)}catch(c){}return a}();function Rc(a,b){this.type=a;this.h=this.target=b;this.defaultPrevented=this.j=!1} Rc.prototype.stopPropagation=function(){this.j=!0}; Rc.prototype.preventDefault=function(){this.defaultPrevented=!0};function Sc(a,b){Rc.call(this,a?a.type:"");this.relatedTarget=this.h=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.i=null;a&&this.init(a,b)} F(Sc,Rc);var Tc={2:"touch",3:"pen",4:"mouse"}; Sc.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.h=b;if(b=a.relatedTarget){if(Db){a:{try{zb(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY|| 0):(this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:Tc[a.pointerType]||"";this.state=a.state; this.i=a;a.defaultPrevented&&Sc.F.preventDefault.call(this)}; Sc.prototype.stopPropagation=function(){Sc.F.stopPropagation.call(this);this.i.stopPropagation?this.i.stopPropagation():this.i.cancelBubble=!0}; Sc.prototype.preventDefault=function(){Sc.F.preventDefault.call(this);var a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1};var Uc="closure_listenable_"+(1E6*Math.random()|0);var Vc=0;function Wc(a,b,c,d,e){this.listener=a;this.h=null;this.src=b;this.type=c;this.capture=!!d;this.aa=e;this.key=++Vc;this.S=this.W=!1} function Xc(a){a.S=!0;a.listener=null;a.h=null;a.src=null;a.aa=null} ;function Yc(a){this.src=a;this.listeners={};this.h=0} Yc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.listeners[f];a||(a=this.listeners[f]=[],this.h++);var g=Zc(a,b,d,e);-1>>0);function fd(a){if("function"===typeof a)return a;a[nd]||(a[nd]=function(b){return a.handleEvent(b)}); return a[nd]} ;function L(){Jc.call(this);this.i=new Yc(this);this.da=this;this.M=null} F(L,Jc);L.prototype[Uc]=!0;L.prototype.addEventListener=function(a,b,c,d){dd(this,a,b,c,d)}; L.prototype.removeEventListener=function(a,b,c,d){ld(this,a,b,c,d)}; function M(a,b){var c=a.M;if(c){var d=[];for(var e=1;c;c=c.M)d.push(c),++e}a=a.da;c=b.type||b;"string"===typeof b?b=new Rc(b,a):b instanceof Rc?b.target=b.target||a:(e=b,b=new Rc(c,a),bb(b,e));e=!0;if(d)for(var f=d.length-1;!b.j&&0<=f;f--){var g=b.h=d[f];e=od(g,c,!0,b)&&e}b.j||(g=b.h=a,e=od(g,c,!0,b)&&e,b.j||(e=od(g,c,!1,b)&&e));if(d)for(f=0;!b.j&&fDate.now())Rd.prototype.remove.call(this,a);else return b}};function Sd(){} ;function Td(){} F(Td,Sd);Td.prototype[Symbol.iterator]=function(){return pd(this.G(!0)).i()}; Td.prototype.clear=function(){var a=Array.from(this);a=u(a);for(var b=a.next();!b.done;b=a.next())this.remove(b.value)};function Ud(a){this.h=a} F(Ud,Td);q=Ud.prototype;q.isAvailable=function(){if(!this.h)return!1;try{return this.h.setItem("__sak","1"),this.h.removeItem("__sak"),!0}catch(a){return!1}}; q.set=function(a,b){try{this.h.setItem(a,b)}catch(c){if(0==this.h.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}}; q.get=function(a){a=this.h.getItem(a);if("string"!==typeof a&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a}; q.remove=function(a){this.h.removeItem(a)}; q.G=function(a){var b=0,c=this.h,d=new Lc;d.next=function(){if(b>=c.length)throw Kc;var e=c.key(b++);if(a)return e;e=c.getItem(e);if("string"!==typeof e)throw"Storage mechanism: Invalid value was encountered";return e}; return d}; q.clear=function(){this.h.clear()}; q.key=function(a){return this.h.key(a)};function Vd(){var a=null;try{a=window.localStorage||null}catch(b){}this.h=a} F(Vd,Ud);function Wd(a,b){this.i=a;this.h=null;if(Bb&&!(9<=Number(Nb))){Xd||(Xd=new Mc);this.h=Xd.get(a);this.h||(b?this.h=document.getElementById(b):(this.h=document.createElement("userdata"),this.h.addBehavior("#default#userData"),document.body.appendChild(this.h)),Xd.set(a,this.h));try{this.h.load(this.i)}catch(c){this.h=null}}} F(Wd,Td);var Yd={".":".2E","!":".21","~":".7E","*":".2A","'":".27","(":".28",")":".29","%":"."},Xd=null;function Zd(a){return"_"+encodeURIComponent(a).replace(/[.!~*'()%]/g,function(b){return Yd[b]})} q=Wd.prototype;q.isAvailable=function(){return!!this.h}; q.set=function(a,b){this.h.setAttribute(Zd(a),b);$d(this)}; q.get=function(a){a=this.h.getAttribute(Zd(a));if("string"!==typeof a&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a}; q.remove=function(a){this.h.removeAttribute(Zd(a));$d(this)}; q.G=function(a){var b=0,c=this.h.XMLDocument.documentElement.attributes,d=new Lc;d.next=function(){if(b>=c.length)throw Kc;var e=c[b++];if(a)return decodeURIComponent(e.nodeName.replace(/\./g,"%")).substr(1);e=e.nodeValue;if("string"!==typeof e)throw"Storage mechanism: Invalid value was encountered";return e}; return d}; q.clear=function(){for(var a=this.h.XMLDocument.documentElement,b=a.attributes.length;0c&&(c=b.length),f=b.indexOf("?"),0>f||f>c?(f=c,e=""):e=b.substring(f+1,c),b=[b.substr(0,f),e,b.substr(c)],c=b[1],b[1]=a?c?c+"&"+a:a:c,a=b[0]+(b[1]?"?"+b[1]:"")+b[2]):a=b;return a+d} function De(a){if(!b)var b=window.location.href;var c=a.match(qb)[1]||null,d=sb(a);c&&d?(a=a.match(qb),b=b.match(qb),a=a[3]==b[3]&&a[1]==b[1]&&a[4]==b[4]):a=d?sb(b)==d&&(Number(b.match(qb)[4]||null)||null)==(Number(a.match(qb)[4]||null)||null):!0;return a} function ye(a){return a&&a.match(ve)?a:decodeURIComponent(a.replace(/\+/g," "))} ;function T(a){a=Ee(a);return"string"===typeof a&&"false"===a?!1:!!a} function Fe(a,b){a=Ee(a);return void 0===a&&void 0!==b?b:Number(a||0)} function Ee(a){var b=S("EXPERIMENTS_FORCED_FLAGS",{});return void 0!==b[a]?b[a]:S("EXPERIMENT_FLAGS",{})[a]} ;function Ge(){} function He(a,b){return Ie(a,0,b)} function Je(a,b){return Ie(a,1,b)} ;function Ke(){Ge.apply(this,arguments)} v(Ke,Ge);function Ie(a,b,c){void 0!==c&&Number.isNaN(Number(c))&&(c=void 0);var d=C("yt.scheduler.instance.addJob");return d?d(a,b,c):void 0===c?(a(),NaN):te(a,c||0)} function Le(a){if(void 0===a||!Number.isNaN(Number(a))){var b=C("yt.scheduler.instance.cancelJob");b?b(a):window.clearTimeout(a)}} Ke.prototype.start=function(){var a=C("yt.scheduler.instance.start");a&&a()};Ke.h||(Ke.h=new Ke);function Me(a){var b=Ne;a=void 0===a?C("yt.ads.biscotti.lastId_")||"":a;var c=Object,d=c.assign,e={};e.dt=ac;e.flash="0";a:{try{var f=b.h.top.location.href}catch(xa){f=2;break a}f=f?f===b.i.location.href?0:1:2}e=(e.frm=f,e);e.u_tz=-(new Date).getTimezoneOffset();var g=void 0===g?K:g;try{var h=g.history.length}catch(xa){h=0}e.u_his=h;e.u_java=!!K.navigator&&"unknown"!==typeof K.navigator.javaEnabled&&!!K.navigator.javaEnabled&&K.navigator.javaEnabled();K.screen&&(e.u_h=K.screen.height,e.u_w=K.screen.width, e.u_ah=K.screen.availHeight,e.u_aw=K.screen.availWidth,e.u_cd=K.screen.colorDepth);K.navigator&&K.navigator.plugins&&(e.u_nplug=K.navigator.plugins.length);K.navigator&&K.navigator.mimeTypes&&(e.u_nmime=K.navigator.mimeTypes.length);h=b.h;try{var k=h.screenX;var l=h.screenY}catch(xa){}try{var m=h.outerWidth;var n=h.outerHeight}catch(xa){}try{var r=h.innerWidth;var p=h.innerHeight}catch(xa){}try{var x=h.screenLeft;var B=h.screenTop}catch(xa){}try{r=h.innerWidth,p=h.innerHeight}catch(xa){}try{var z= h.screen.availWidth;var O=h.screen.availTop}catch(xa){}k=[x,B,k,l,z,O,m,n,r,p];l=b.h.top;try{var P=(l||window).document,G="CSS1Compat"==P.compatMode?P.documentElement:P.body;var N=(new Tb(G.clientWidth,G.clientHeight)).round()}catch(xa){N=new Tb(-12245933,-12245933)}P=N;N={};G=new mc;A.SVGElement&&A.document.createElementNS&&G.set(0);l=$b();l["allow-top-navigation-by-user-activation"]&&G.set(1);l["allow-popups-to-escape-sandbox"]&&G.set(2);A.crypto&&A.crypto.subtle&&G.set(3);A.TextDecoder&&A.TextEncoder&& G.set(4);G=nc(G);N.bc=G;N.bih=P.height;N.biw=P.width;N.brdim=k.join();b=b.i;b=(N.vis={visible:1,hidden:2,prerender:3,preview:4,unloaded:5}[b.visibilityState||b.webkitVisibilityState||b.mozVisibilityState||""]||0,N.wgl=!!K.WebGLRenderingContext,N);c=d.call(c,e,b);c.ca_type="image";a&&(c.bid=a);return c} var Ne=new function(){var a=window.document;this.h=window;this.i=a}; E("yt.ads_.signals_.getAdSignalsString",function(a){return Ae(Me(a))});var Oe="XMLHttpRequest"in A?function(){return new XMLHttpRequest}:null; function Pe(){if(!Oe)return null;var a=Oe();return"open"in a?a:null} ;var Qe={Authorization:"AUTHORIZATION","X-Goog-Visitor-Id":"SANDBOXED_VISITOR_ID","X-Youtube-Chrome-Connected":"CHROME_CONNECTED_HEADER","X-YouTube-Client-Name":"INNERTUBE_CONTEXT_CLIENT_NAME","X-YouTube-Client-Version":"INNERTUBE_CONTEXT_CLIENT_VERSION","X-YouTube-Delegation-Context":"INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT","X-YouTube-Device":"DEVICE","X-Youtube-Identity-Token":"ID_TOKEN","X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Label":"PAGE_BUILD_LABEL","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"}, Re="app debugcss debugjs expflag force_ad_params force_ad_encrypted force_viral_ad_response_params forced_experiments innertube_snapshots innertube_goldens internalcountrycode internalipoverride absolute_experiments conditional_experiments sbb sr_bns_address client_dev_root_url".split(" "),Se=!1; function Te(a,b){b=void 0===b?{}:b;var c=De(a),d=T("web_ajax_ignore_global_headers_if_set"),e;for(e in Qe){var f=S(Qe[e]);!f||!c&&sb(a)||d&&void 0!==b[e]||(b[e]=f)}if(c||!sb(a))b["X-YouTube-Utc-Offset"]=String(-(new Date).getTimezoneOffset());if(c||!sb(a)){try{var g=(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(h){}g&&(b["X-YouTube-Time-Zone"]=g)}if(c||!sb(a))b["X-YouTube-Ad-Signals"]=Ae(Me(void 0));return b} function Ue(a){var b=window.location.search,c=sb(a);T("debug_handle_relative_url_for_query_forward_killswitch")||c||!De(a)||(c=document.location.hostname);var d=rb(a.match(qb)[5]||null);d=(c=c&&(c.endsWith("youtube.com")||c.endsWith("youtube-nocookie.com")))&&d&&d.startsWith("/api/");if(!c||d)return a;var e=Be(b),f={};H(Re,function(g){e[g]&&(f[g]=e[g])}); return Ce(a,f||{},!1)} function Ve(a,b){var c=b.format||"JSON";a=We(a,b);var d=Xe(a,b),e=!1,f=Ye(a,function(k){if(!e){e=!0;h&&window.clearTimeout(h);a:switch(k&&"status"in k?k.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:var l=!0;break a;default:l=!1}var m=null,n=400<=k.status&&500>k.status,r=500<=k.status&&600>k.status;if(l||n||r)m=Ze(a,c,k,b.convertToSafeHtml);if(l)a:if(k&&204==k.status)l=!0;else{switch(c){case "XML":l=0==parseInt(m&&m.return_code,10);break a;case "RAW":l=!0;break a}l= !!m}m=m||{};n=b.context||A;l?b.onSuccess&&b.onSuccess.call(n,k,m):b.onError&&b.onError.call(n,k,m);b.onFinish&&b.onFinish.call(n,k,m)}},b.method,d,b.headers,b.responseType,b.withCredentials); if(b.onTimeout&&0=a?Bf({writeThenSend:!0}):10<=b-vf&&(Cf(),vf=b)}} function Df(a,b){if("log_event"===a.endpoint){var c="";a.Y?c="visitorOnlyApprovedKey":a.H&&(yf[a.H.token]=Af(a.H),c=a.H.token);var d=new Map;d.set(c,[a.payload]);b&&(sf=new b);return new Q(function(e){sf&&sf.isReady()?Ef(d,e,{bypassNetworkless:!0}):e()})}} function Bf(a){a=void 0===a?{}:a;new Q(function(b){window.clearTimeout(tf);window.clearTimeout(uf);uf=0;sf&&sf.isReady()?(Ef(xf,b,a),xf.clear()):(Cf(),b())})} function Cf(){T("web_gel_timeout_cap")&&!uf&&(uf=te(function(){Bf({writeThenSend:!0})},6E4)); window.clearTimeout(tf);var a=S("LOGGING_BATCH_TIMEOUT",Fe("web_gel_debounce_ms",1E4));T("shorten_initial_gel_batch_timeout")&&wf&&(a=of);tf=te(function(){Bf({writeThenSend:!0})},a)} function Ef(a,b,c){var d=sf;c=void 0===c?{}:c;var e=Math.round(U()),f=a.size;a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=u(g.value);g=h.next().value;var k=h.next().value;h=$a({context:Ff(d.config_||Gf())});h.events=k;(k=yf[g])&&Hf(h,g,k);delete yf[g];g="visitorOnlyApprovedKey"===g;If(h,e,g);T("send_beacon_before_gel")&&window.navigator&&window.navigator.sendBeacon&&!c.writeThenSend&&ff("/generate_204");Jf(d,"log_event",h,{retry:!0,onSuccess:function(){f--;f||b();rf=Math.round(U()-e)}, onError:function(){f--;f||b()}, na:c,Y:g});wf=!1}} function If(a,b,c){a.requestTimeMs=String(b);T("unsplit_gel_payloads_in_logs")&&(a.unsplitGelPayloadsInLogs=!0);!c&&(b=S("EVENT_ID",void 0))&&((c=S("BATCH_CLIENT_COUNTER",void 0)||0)||(c=Math.floor(Math.random()*pf/2)),c++,c>pf&&(c=1),fe("BATCH_CLIENT_COUNTER",c),b={serializedEventId:b,clientCounter:String(c)},a.serializedClientEventId=b,qf&&rf&&T("log_gel_rtt_web")&&(a.previousBatchInfo={serializedClientEventId:qf,roundtripMs:String(rf)}),qf=b,rf=0)} function Hf(a,b,c){if(c.videoId)var d="VIDEO";else if(c.playlistId)d="PLAYLIST";else return;a.credentialTransferTokenTargetId=c;a.context=a.context||{};a.context.user=a.context.user||{};a.context.user.credentialTransferTokens=[{token:b,scope:d}]} function Af(a){var b={};a.videoId?b.videoId=a.videoId:a.playlistId&&(b.playlistId=a.playlistId);return b} ;var Kf=A.ytLoggingGelSequenceIdObj_||{};E("ytLoggingGelSequenceIdObj_",Kf);function Lf(){if(!A.matchMedia)return"WEB_DISPLAY_MODE_UNKNOWN";try{return A.matchMedia("(display-mode: standalone)").matches?"WEB_DISPLAY_MODE_STANDALONE":A.matchMedia("(display-mode: minimal-ui)").matches?"WEB_DISPLAY_MODE_MINIMAL_UI":A.matchMedia("(display-mode: fullscreen)").matches?"WEB_DISPLAY_MODE_FULLSCREEN":A.matchMedia("(display-mode: browser)").matches?"WEB_DISPLAY_MODE_BROWSER":"WEB_DISPLAY_MODE_UNKNOWN"}catch(a){return"WEB_DISPLAY_MODE_UNKNOWN"}} ;E("ytglobal.prefsUserPrefsPrefs_",C("ytglobal.prefsUserPrefsPrefs_")||{});var Mf={bluetooth:"CONN_DISCO",cellular:"CONN_CELLULAR_UNKNOWN",ethernet:"CONN_WIFI",none:"CONN_NONE",wifi:"CONN_WIFI",wimax:"CONN_CELLULAR_4G",other:"CONN_UNKNOWN",unknown:"CONN_UNKNOWN","slow-2g":"CONN_CELLULAR_2G","2g":"CONN_CELLULAR_2G","3g":"CONN_CELLULAR_3G","4g":"CONN_CELLULAR_4G"},Nf={"slow-2g":"EFFECTIVE_CONNECTION_TYPE_SLOW_2G","2g":"EFFECTIVE_CONNECTION_TYPE_2G","3g":"EFFECTIVE_CONNECTION_TYPE_3G","4g":"EFFECTIVE_CONNECTION_TYPE_4G"}; function Of(){var a=A.navigator;return a?a.connection:void 0} ;function Pf(){return"INNERTUBE_API_KEY"in ee&&"INNERTUBE_API_VERSION"in ee} function Gf(){return{innertubeApiKey:S("INNERTUBE_API_KEY",void 0),innertubeApiVersion:S("INNERTUBE_API_VERSION",void 0),Aa:S("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO"),Ba:S("INNERTUBE_CONTEXT_CLIENT_NAME","WEB"),innertubeContextClientVersion:S("INNERTUBE_CONTEXT_CLIENT_VERSION",void 0),Da:S("INNERTUBE_CONTEXT_HL",void 0),Ca:S("INNERTUBE_CONTEXT_GL",void 0),Ea:S("INNERTUBE_HOST_OVERRIDE",void 0)||"",Ga:!!S("INNERTUBE_USE_THIRD_PARTY_AUTH",!1),Fa:!!S("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT", !1),appInstallData:S("SERIALIZED_CLIENT_CONFIG_DATA",void 0)}} function Ff(a){var b={client:{hl:a.Da,gl:a.Ca,clientName:a.Ba,clientVersion:a.innertubeContextClientVersion,configInfo:a.Aa}},c=A.devicePixelRatio;c&&1!=c&&(b.client.screenDensityFloat=String(c));c=S("EXPERIMENTS_TOKEN","");""!==c&&(b.client.experimentsToken=c);c=[];var d=S("EXPERIMENTS_FORCED_FLAGS",{});for(e in d)c.push({key:e,value:String(d[e])});var e=S("EXPERIMENT_FLAGS",{});for(var f in e)f.startsWith("force_")&&void 0===d[f]&&c.push({key:f,value:String(e[f])});0f;f++){var g=d.concat(e[f].split(""));Rb[f]=g;for(var h=0;h>2;l=(l&3)<<4|m>>4;m=(m&15)<<2|k>>6;k&=63;g||(k=64,f||(m=64));d.push(c[h],c[l],c[m]||"",c[k]||"")}a.hash=d.join("")}return a} ;function Sf(a){var b=new Vd;(b=b.isAvailable()?a?new ae(b,a):b:null)||(a=new Wd(a||"UserDataSharedStore"),b=a.isAvailable()?a:null);this.h=(a=b)?new Rd(a):null;this.i=document.domain||window.location.hostname} Sf.prototype.set=function(a,b,c,d){c=c||31104E3;this.remove(a);if(this.h)try{this.h.set(a,b,Date.now()+1E3*c);return}catch(f){}var e="";if(d)try{e=escape(ud(b))}catch(f){return}else e=escape(b);b=this.i;ic.set(""+a,e,{ea:c,path:"/",domain:void 0===b?"youtube.com":b,secure:!1})}; Sf.prototype.get=function(a,b){var c=void 0,d=!this.h;if(!d)try{c=this.h.get(a)}catch(e){d=!0}if(d&&(c=ic.get(""+a,void 0))&&(c=unescape(c),b))try{c=JSON.parse(c)}catch(e){this.remove(a),c=void 0}return c}; Sf.prototype.remove=function(a){this.h&&this.h.remove(a);var b=this.i;ic.remove(""+a,"/",void 0===b?"youtube.com":b)};var Tf;function Uf(){Tf||(Tf=new Sf("yt.innertube"));return Tf} function Vf(a,b,c,d){if(d)return null;d=Uf().get("nextId",!0)||1;var e=Uf().get("requests",!0)||{};e[d]={method:a,request:b,authState:Rf(c),requestTime:Math.round(U())};Uf().set("nextId",d+1,86400,!0);Uf().set("requests",e,86400,!0);return d} function Wf(a){var b=Uf().get("requests",!0)||{};delete b[a];Uf().set("requests",b,86400,!0)} function Xf(a){var b=Uf().get("requests",!0);if(b){for(var c in b){var d=b[c];if(!(6E4>Math.round(U())-d.requestTime)){var e=d.authState,f=Rf(Qf(!1));Za(e,f)&&(e=d.request,"requestTimeMs"in e&&(e.requestTimeMs=Math.round(U())),Jf(a,d.method,e,{}));delete b[c]}}Uf().set("requests",b,86400,!0)}} ;var Yf=C("ytPubsub2Pubsub2Instance")||new R;R.prototype.subscribe=R.prototype.subscribe;R.prototype.unsubscribeByKey=R.prototype.T;R.prototype.publish=R.prototype.O;R.prototype.clear=R.prototype.clear;E("ytPubsub2Pubsub2Instance",Yf);E("ytPubsub2Pubsub2SubscribedKeys",C("ytPubsub2Pubsub2SubscribedKeys")||{});E("ytPubsub2Pubsub2TopicToKeys",C("ytPubsub2Pubsub2TopicToKeys")||{});E("ytPubsub2Pubsub2IsAsync",C("ytPubsub2Pubsub2IsAsync")||{});E("ytPubsub2Pubsub2SkipSubKey",null);function Zf(){} ;var $f=function(){var a;return function(){a||(a=new Sf("ytidb"));return a}}(); function ag(){var a;return null===(a=$f())||void 0===a?void 0:a.get("LAST_RESULT_ENTRY_KEY",!0)} function bg(a){this.h=void 0===a?!1:a;(a=ag())||(a={hasSucceededOnce:this.h});this.i=a;var b,c;T("ytidb_analyze_is_supported")&&(null===(c=$f())||void 0===c?0:c.h)&&(c={hasSucceededOnce:this.i.hasSucceededOnce||this.h},null===(b=$f())||void 0===b?void 0:b.set("LAST_RESULT_ENTRY_KEY",c,2592E3,!0))} bg.prototype.isSupported=function(){return this.h};var cg=[],dg=!1;function eg(a){dg||(cg.push({type:"ERROR",payload:a}),10=k)Kg(g,n,z,l,O,b.join(),h),m=O;G.u(2);break;case 3:return G.return(Promise.reject(m))}})})} function Kg(a,b,c,d,e,f,g){b=c-b;e?(e instanceof V&&("QUOTA_EXCEEDED"===e.type||"QUOTA_MAYBE_EXCEEDED"===e.type)&&fg("QUOTA_EXCEEDED",{dbName:jg(a.h.name),objectStoreNames:f,transactionCount:a.transactionCount,transactionMode:g.mode}),e instanceof V&&"UNKNOWN_ABORT"===e.type&&(fg("TRANSACTION_UNEXPECTEDLY_ABORTED",{objectStoreNames:f,transactionDuration:b,transactionCount:a.transactionCount,dbDuration:c-a.j}),a.i=!0),Lg(a,!1,d,f,b),eg(e)):Lg(a,!0,d,f,b)} function Lg(a,b,c,d,e){fg("TRANSACTION_ENDED",{objectStoreNames:d,connectionHasUnknownAbortedTransaction:a.i,duration:e,isSuccessful:b,tryCount:c})} function Gg(a){this.h=a} q=Gg.prototype;q.add=function(a,b){return X(this.h.add(a,b))}; q.clear=function(){return X(this.h.clear()).then(function(){})}; q.count=function(a){return X(this.h.count(a))}; function Mg(a,b){return Ng(a,{query:b},function(c){return c.delete().then(function(){return c.continue()})}).then(function(){})} q.delete=function(a){return a instanceof IDBKeyRange?Mg(this,a):X(this.h.delete(a))}; q.get=function(a){return X(this.h.get(a))}; q.index=function(a){return new Og(this.h.index(a))}; q.getName=function(){return this.h.name}; function Ng(a,b,c){a=a.h.openCursor(b.query,b.direction);return Pg(a).then(function(d){return Bg(d,c)})} function Ig(a){var b=this;this.h=a;this.i=new Map;this.aborted=!1;this.done=new Promise(function(c,d){b.h.addEventListener("complete",function(){c()}); b.h.addEventListener("error",function(e){e.currentTarget===e.target&&d(b.h.error)}); b.h.addEventListener("abort",function(){var e=b.h.error;if(e)d(e);else if(!b.aborted){e=V;for(var f=b.h.objectStoreNames,g=[],h=0;hb&&Fg(a,"databases",{keyPath:"actualName"})}}); function Xg(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,Wg.open(),2);d=e.i;return e.return(Dg(d,["databases"],{C:!0,mode:"readwrite"},function(f){var g=Eg(f,"databases");return g.get(a.actualName).then(function(h){if(h?a.actualName!==h.actualName||a.publicName!==h.publicName||a.userIdentifier!==h.userIdentifier||a.clearDataOnAuthChange!==h.clearDataOnAuthChange:1)return X(g.h.put(a,void 0)).then(function(){})})}))})})} function Yg(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,Wg.open(),2);d=e.i;return e.return(d.delete("databases",a))})})} ;var Zg; function $g(){return J(this,function b(){var c,d,e;return y(b,function(f){switch(f.h){case 1:if(T("ytidb_is_supported_cache_success_result")&&(c=ag(),null===c||void 0===c?0:c.hasSucceededOnce))return f.return(new bg(!0));var g;if(g=cf)g=/WebKit\/([0-9]+)/.exec(lb),g=!!(g&&600<=parseInt(g[1],10));g&&(g=/WebKit\/([0-9]+)/.exec(lb),g=!(g&&602<=parseInt(g[1],10)));if(g||Cb)return f.return(new bg(!1));try{if(d=self,!(d.indexedDB&&d.IDBIndex&&d.IDBKeyRange&&d.IDBObjectStore))return f.return(new bg(!1))}catch(h){return f.return(new bg(!1))}if(!("IDBTransaction"in self&& "objectStoreNames"in IDBTransaction.prototype))return f.return(new bg(!1));pa(f,2);e={actualName:"yt-idb-test-do-not-use",publicName:"yt-idb-test-do-not-use",userIdentifier:void 0};return w(f,Xg(e),4);case 4:return w(f,Yg("yt-idb-test-do-not-use"),5);case 5:return f.return(new bg(!0));case 2:return qa(f),f.return(new bg(!1))}})})} function ah(){if(void 0!==Zg)return Zg;dg=!0;return Zg=$g().then(function(a){dg=!1;return a.isSupported()})} ;function bh(a){try{hg();var b=!0}catch(c){b=!1}if(!b)throw a=new V("AUTH_INVALID"),eg(a),a;b=hg();return{actualName:a+":"+b,publicName:a,userIdentifier:b}} function ch(a,b,c,d){var e;return J(this,function g(){var h,k;return y(g,function(l){switch(l.h){case 1:return w(l,dh({caller:"openDbImpl",publicName:a,version:b}),2);case 2:return ig(a),h=c?{actualName:a,publicName:a,userIdentifier:void 0}:bh(a),h.clearDataOnAuthChange=null!==(e=d.clearDataOnAuthChange)&&void 0!==e?e:!1,pa(l,3),w(l,Xg(h),5);case 5:return w(l,Tg(h.actualName,b,d),6);case 6:return l.return(l.i);case 3:return k=qa(l),pa(l,7),w(l,Yg(h.actualName),9);case 9:l.h=8;l.s=0;break;case 7:qa(l); case 8:throw k;}})})} function dh(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,ah(),2);if(!e.i)throw d=new V("IDB_NOT_SUPPORTED",{context:a}),eg(d),d;e.h=0})})} function eh(a,b,c){c=void 0===c?{}:c;return ch(a,b,!1,c)} function fh(a,b,c){c=void 0===c?{}:c;return ch(a,b,!0,c)} function gh(a,b){b=void 0===b?{}:b;return J(this,function d(){var e;return y(d,function(f){if(1==f.h)return w(f,ah(),2);if(3!=f.h){if(!f.i)return f.return();ig(a);e=bh(a);return w(f,Ug(e.actualName,b),3)}return w(f,Yg(e.actualName),0)})})} function hh(a,b){b=void 0===b?{}:b;return J(this,function d(){return y(d,function(e){if(1==e.h)return w(e,ah(),2);if(3!=e.h){if(!e.i)return e.return();ig(a);return w(e,Ug(a,b),3)}return w(e,Yg(a),0)})})} ;function ih(a,b){Vg.call(this,a,b);this.options=b;ig(a)} v(ih,Vg);ih.prototype.i=function(a,b,c){c=void 0===c?{}:c;return(this.options.ra?fh:eh)(a,b,Object.assign(Object.assign({},c),{clearDataOnAuthChange:this.options.clearDataOnAuthChange}))}; ih.prototype.delete=function(a){a=void 0===a?{}:a;return(this.options.ra?hh:gh)(this.name,a)}; function jh(a){var b;return function(){b||(b=new ih("LogsDatabaseV2",a));return b}} ;function kh(){W.call(this,function(){}); throw Error("Not allowed to instantiate the thennable outside of the core library.");} v(kh,W);kh.reject=W.reject;kh.resolve=W.resolve;kh.all=W.all;var lh;function mh(){if(!lh){var a={};lh=jh({oa:(a.LogsRequestsStore=!0,a.sapisid=!0,a.SWHealthLog=!0,a),ra:!T("nwl_use_ytidb_partitioning"),upgrade:function(b,c){2>c&&(Fg(b,"LogsRequestsStore",{keyPath:"id",autoIncrement:!0}).h.createIndex("newRequest",["status","authHash","interface","timestamp"],{unique:!1}),Fg(b,"sapisid"));3>c&&Fg(b,"SWHealthLog",{keyPath:"id",autoIncrement:!0}).h.createIndex("swHealthNewRequest",["interface","timestamp"],{unique:!1})}, version:3})}return lh().open()} function nh(a){return J(this,function c(){var d,e,f,g,h;return y(c,function(k){switch(k.h){case 1:return d={startTime:U(),transactionType:"YT_IDB_TRANSACTION_TYPE_WRITE"},w(k,oh(),2);case 2:return e=k.i,w(k,mh(),3);case 3:return f=k.i,g=Object.assign(Object.assign({},a),{options:JSON.parse(JSON.stringify(a.options)),authHash:e,interface:S("INNERTUBE_CONTEXT_CLIENT_NAME",0)}),w(k,Hg(f,g),4);case 4:return h=k.i,d.Ka=U(),ph(d),k.return(h)}})})} function qh(){return J(this,function b(){var c,d,e,f,g,h,k,l;return y(b,function(m){switch(m.h){case 1:return c={startTime:U(),transactionType:"YT_IDB_TRANSACTION_TYPE_READ"},w(m,oh(),2);case 2:return d=m.i,e=S("INNERTUBE_CONTEXT_CLIENT_NAME",0),f=["NEW",d,e,0],g=["NEW",d,e,U()],h=IDBKeyRange.bound(f,g),w(m,mh(),3);case 3:return k=m.i,l=void 0,w(m,Dg(k,["LogsRequestsStore"],{mode:"readwrite",C:!0},function(n){return Qg(Eg(n,"LogsRequestsStore").index("newRequest"),{query:h,direction:"prev"},function(r){r.cursor.value&& (l=r.cursor.value,l.status="QUEUED",r.update(l))})}),4); case 4:return c.Ka=U(),ph(c),m.return(l)}})})} function rh(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,mh(),2);d=e.i;return e.return(Dg(d,["LogsRequestsStore"],{mode:"readwrite",C:!0},function(f){var g=Eg(f,"LogsRequestsStore");return g.get(a).then(function(h){if(h)return h.status="QUEUED",X(g.h.put(h,void 0)).then(function(){return h})})}))})})} function sh(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,mh(),2);d=e.i;return e.return(Dg(d,["LogsRequestsStore"],{mode:"readwrite",C:!0},function(f){var g=Eg(f,"LogsRequestsStore");return g.get(a).then(function(h){return h?(h.status="NEW",h.sendCount+=1,X(g.h.put(h,void 0)).then(function(){return h})):kh.resolve(void 0)})}))})})} function th(a){return J(this,function c(){var d;return y(c,function(e){if(1==e.h)return w(e,mh(),2);d=e.i;return e.return(d.delete("LogsRequestsStore",a))})})} function oh(){return J(this,function b(){var c;return y(b,function(d){if(1==d.h){Zf.h||(Zf.h=new Zf);var e={};var f=lc([]);f&&(e.Authorization=f,f=void 0,void 0===f&&(f=Number(S("SESSION_INDEX",0)),f=isNaN(f)?0:f),e["X-Goog-AuthUser"]=f,"INNERTUBE_HOST_OVERRIDE"in ee||(e["X-Origin"]=window.location.origin),T("pageid_as_header_web")&&"DELEGATED_SESSION_ID"in ee&&(e["X-Goog-PageId"]=S("DELEGATED_SESSION_ID")));e instanceof Q||(f=new Q(Da),vd(f,2,e),e=f);return w(d,e,2)}c=d.i;e=d.return;f=Rf(c);var g= new Dc;g.update(JSON.stringify(f,Object.keys(f).sort()));f=g.digest();g="";for(var h=0;h a.sendCount?w(k,sh(a.id),8):w(k,th(a.id),4);case 8:Je(function(){Lh().J()&&Rh()},5E3); case 4:c(e,f),k.h=0}})})}; var d=a.options.onSuccess?a.options.onSuccess:function(){}; a.options.onSuccess=function(e,f){return J(b,function h(){return y(h,function(k){if(1==k.h)return void 0===(null===a||void 0===a?void 0:a.id)?k.u(2):w(k,th(a.id),2);d(e,f);k.h=0})})}; return a} function Lh(){Ih||(Ih=new Eh({Ha:!0,za:T("trigger_nsm_validation_checks_with_nwl")}));return Ih} function Nh(a,b){if(T("networkless_with_beacon")){var c=["method","postBody"];if(Object.keys(b).length>c.length)var d=!0;else{d=0;c=u(c);for(var e=c.next();!e.done;e=c.next())b.hasOwnProperty(e.value)&&d++;d=Object.keys(b).length!==d}d?Ve(a,b):ff(a,void 0,b.postBody)}else Ve(a,b)} function Mh(){return C("ytNetworklessLoggingInitializationOptions")?Jh.isNwlInitialized:!1} function Ph(){return C("ytNetworklessLoggingInitializationOptions")?Jh.isIdbSupported:!1} ;function Th(a){var b=this;this.config_=null;a?this.config_=a:Pf()&&(this.config_=Gf());He(function(){Xf(b)},5E3)} Th.prototype.isReady=function(){!this.config_&&Pf()&&(this.config_=Gf());return!!this.config_}; function Jf(a,b,c,d){function e(r){r=void 0===r?!1:r;var p;if(d.retry&&"www.youtube-nocookie.com"!=h&&(r||(p=Vf(b,c,l,k)),p)){var x=g.onSuccess,B=g.onFetchSuccess;g.onSuccess=function(z,O){Wf(p);x(z,O)}; c.onFetchSuccess=function(z,O){Wf(p);B(z,O)}}try{r&&d.retry&&!d.na.bypassNetworkless?(g.method="POST",!d.na.writeThenSend&&T("nwl_send_fast_on_unload")?Qh(n,g):Kh(n,g)):(g.method="POST",g.postParams||(g.postParams={}),Ve(n,g))}catch(z){if("InvalidAccessError"==z.name)p&&(Wf(p),p=0),ke(Error("An extension is blocking network request.")); else throw z;}p&&He(function(){Xf(a)},5E3)} !S("VISITOR_DATA")&&"visitor_id"!==b&&.01>Math.random()&&ke(new gg("Missing VISITOR_DATA when sending innertube request.",b,c,d));if(!a.isReady()){var f=new gg("innertube xhrclient not ready",b,c,d);je(f);throw f;}var g={headers:{"Content-Type":"application/json"},method:"POST",postParams:c,postBodyFormat:"JSON",onTimeout:function(){d.onTimeout()}, onFetchTimeout:d.onTimeout,onSuccess:function(r,p){if(d.onSuccess)d.onSuccess(p)}, onFetchSuccess:function(r){if(d.onSuccess)d.onSuccess(r)}, onError:function(r,p){if(d.onError)d.onError(p)}, onFetchError:function(r){if(d.onError)d.onError(r)}, timeout:d.timeout,withCredentials:!0},h="";(f=a.config_.Ea)&&(h=f);var k=a.config_.Ga||!1,l=Qf(k,h,d);Object.assign(g.headers,l);g.headers.Authorization&&!h&&(g.headers["x-origin"]=window.location.origin);f="/youtubei/"+a.config_.innertubeApiVersion+"/"+b;var m={alt:"json"};a.config_.Fa&&g.headers.Authorization||(m.key=a.config_.innertubeApiKey);var n=Ce(""+h+f,m||{},!0);Mh()?ah().then(function(r){e(r)}):e(!1)} ;function Uh(a,b){var c=void 0===c?{}:c;var d=Th;S("ytLoggingEventsDefaultDisabled",!1)&&Th==Th&&(d=null);c=void 0===c?{}:c;var e={},f=Math.round(c.timestamp||U());e.eventTimeMs=f>3;switch(e&7){case 0:e=ci(b);if(2===f)return e;break;case 1:if(2===f)return;d+=8;break;case 2:e=ci(b);if(2===f)return a.substr(d,e);d+=e;break;case 5:if(2===f)return;d+=4;break;default:return}}while(db)return c;b=a();c|=(b&127)<<7;if(128>b)return c;b=a();c|=(b&127)<<14;if(128>b)return c;b=a();return 128>b?c|(b&127)<<21:Infinity} ;function di(a,b,c,d){if(a)if(Array.isArray(a)){var e=d;for(d=0;d")&&(a=a.replace(gb,">")),-1!=a.indexOf('"')&&(a=a.replace(hb,""")),-1!=a.indexOf("'")&&(a=a.replace(ib,"'")),-1!=a.indexOf("\x00")&& (a=a.replace(jb,"�")));return''}; q.getOptions=function(a){return this.D.namespaces?a?this.D[a]?this.D[a].options||[]:[]:this.D.namespaces||[]:[]}; q.getOption=function(a,b){if(this.D.namespaces&&a&&b&&this.D[a])return this.D[a][b]}; function Ji(a){if("iframe"!==a.tagName.toLowerCase()){var b=si(a,"videoid");b&&(b={videoId:b,width:si(a,"width"),height:si(a,"height")},new Gi(a,b))}} ;E("YT.PlayerState.UNSTARTED",-1);E("YT.PlayerState.ENDED",0);E("YT.PlayerState.PLAYING",1);E("YT.PlayerState.PAUSED",2);E("YT.PlayerState.BUFFERING",3);E("YT.PlayerState.CUED",5);E("YT.get",function(a){return oi[a]}); E("YT.scan",ri);E("YT.subscribe",function(a,b,c){Ld.subscribe(a,b,c);qi[a]=!0;for(var d in oi)oi.hasOwnProperty(d)&&Ai(oi[d],a)}); E("YT.unsubscribe",function(a,b,c){Kd(a,b,c)}); E("YT.Player",Gi);xi.prototype.destroy=xi.prototype.destroy;xi.prototype.setSize=xi.prototype.setSize;xi.prototype.getIframe=xi.prototype.ta;xi.prototype.addEventListener=xi.prototype.addEventListener;Gi.prototype.getVideoEmbedCode=Gi.prototype.getVideoEmbedCode;Gi.prototype.getOptions=Gi.prototype.getOptions;Gi.prototype.getOption=Gi.prototype.getOption; pi.push(function(a){var b=a;b||(b=document);a=Ua(b.getElementsByTagName("yt:player"));var c=b||document;if(c.querySelectorAll&&c.querySelector)b=c.querySelectorAll(".yt-player");else{var d;c=document;b=b||c;if(b.querySelectorAll&&b.querySelector)b=b.querySelectorAll(".yt-player");else if(b.getElementsByClassName){var e=b.getElementsByClassName("yt-player");b=e}else{e=b.getElementsByTagName("*");var f={};for(c=d=0;b=e[c];c++){var g=b.className,h;if(h="function"==typeof g.split)h=0<=Pa(g.split(/\s+/), "yt-player");h&&(f[d++]=b)}f.length=d;b=f}}b=Ua(b);H(Ta(a,b),Ji)}); "undefined"!=typeof YTConfig&&YTConfig.parsetags&&"onload"!=YTConfig.parsetags||ri();var Ki=A.onYTReady;Ki&&Ki();var Li=A.onYouTubeIframeAPIReady;Li&&Li();var Mi=A.onYouTubePlayerAPIReady;Mi&&Mi();}).call(this);